<!DOCTYPE html>

<html xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core">


<h:head>



	<style type="text/css">
.ui-layout,.ui-layout-doc,.ui-layout-unit,.ui-layout-wrap,.ui-layout-bd,.ui-layout-hd
	{
	border: none;
}

.companyHeaderGrid tr,.companyHeaderGrid td {
	border: none;
}
</style>

</h:head>

<h:body>

	<ui:composition>


		<h:form id="new_escursione_form">
		
			<p:growl id="escursioneGrowl" autoUpdate="true" for="create_escursione_growl" />
					
			
			<p:panelGrid columns="3" id="escursione-data-panel"
				style="min-width: 100%; margin: 0 auto"
				styleClass="companyHeaderGrid">



				<f:facet name="header">
					<p:outputLabel style="font-size: 15pt">Dati del escursione da creare</p:outputLabel>
				</f:facet>

				<h:outputText value="Citta: " />
				<p:autoComplete id="city"
					value="#{escursioneBean.nuovaEscurione.citta}" 
					label="Citta Partenza" completeMethod="#{cittaBean.complete}"
					var="c" itemLabel="#{c.name}" minQueryLength="3" itemValue="#{c}"
					forceSelection="true" converter="cittaConverter" required="true"
					requiredMessage="Inserire una città per l'escursione">

					<p:ajax event="itemSelect" update="city" />

				</p:autoComplete>
				<p:message display="text" for="city" />


				<h:outputText value="Prezzo: " />
				<p:inputText id="prezzo_escursione" required="true"
					requiredMessage="Inserire un prezzo per il trasporto"
					value="#{escursioneBean.nuovaEscurione.prezzo}" />
				<p:message display="text" for="prezzo_escursione" />


				<h:outputText value="Descrzione: " />
				<p:inputTextarea rows="3" cols="60" maxlength="100"
					autoResize="true"
					value="#{escursioneBean.nuovaEscurione.descrizione}" />


				<f:facet name="footer">
					<p:commandButton value="Conferma"
						actionListener="#{escursioneBean.addEscursione}"
						update="escursione-data-panel" />
				</f:facet>
			</p:panelGrid>
		</h:form>


	</ui:composition>

</h:body>
</html>